home *** CD-ROM | disk | FTP | other *** search
/ Best of www.BestZips.com (Collector's Edition) / Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO / fileutil / belt1c.zip / BELT.DOC < prev    next >
Text File  |  1994-07-01  |  92KB  |  2,299 lines

  1.   
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                   ========= 
  13.           ===============================    U t i l i t y 
  14.                   =     ====o  o  o  o 
  15.           ===============================    B e l t        v1c 
  16.                   ========= 
  17.  
  18.  
  19.                              Shareware Utility Collection 
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.                            Copyright 1990, 1991, 1992, 1994 
  36.  
  37.                                Herne Data Systems Ltd. 
  38.  
  39.                                       PO Box 250 
  40.                                 Tiverton, ON  N0G 2T0 
  41.  
  42.                                         CANADA 
  43.  
  44.  
  45.                              voice or FAX (519) 366-2732 
  46.  
  47.  
  48.                                 CompuServe 72060,1153 
  49.                                 Internet herne@wbb.com 
  50.  
  51.                              Software worth hunting for! 
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.           BELT.DOC v1.c 94-07-01  
  60.  
  61.  
  62.  
  63.            TABLE OF CONTENTS 
  64.  
  65.           THE FINE PRINT  . . . . . . . . . . . . . . . . . . . . . . .  ii 
  66.                DISCLAIMER - AGREEMENT   . . . . . . . . . . . . . . . .  ii 
  67.                REGISTRATION BENEFITS  . . . . . . . . . . . . . . . . . iii 
  68.                REGISTRATION AND CUSTOMER SUPPORT ADDRESS  . . . . . . . iii 
  69.                COMPUSERVE SHAREWARE REGISTRATION SERVICE  . . . . . . . iii 
  70.                ASP OMBUDSMAN  . . . . . . . . . . . . . . . . . . . . .  iv 
  71.                DEFINITION OF SHAREWARE  . . . . . . . . . . . . . . . .  iv 
  72.  
  73.           INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . . .   1 
  74.                TERMINOLOGY AND CONVENTIONS  . . . . . . . . . . . . . .   3 
  75.                DOS ERRORLEVEL and Batch Files . . . . . . . . . . . . .   5 
  76.  
  77.           INTERACTIVE UTILITIES . . . . . . . . . . . . . . . . . . . .   7 
  78.                SELECT.COM . . . . . . . . . . . . . . . . . . . . . . .   7 
  79.                CONFIRM.COM  . . . . . . . . . . . . . . . . . . . . . .  10 
  80.                WAIT.COM . . . . . . . . . . . . . . . . . . . . . . . .  11 
  81.                GETKEY.COM . . . . . . . . . . . . . . . . . . . . . . .  12 
  82.                SLEEP.COM  . . . . . . . . . . . . . . . . . . . . . . .  13 
  83.                BLEEP.COM  . . . . . . . . . . . . . . . . . . . . . . .  14 
  84.                TC.COM . . . . . . . . . . . . . . . . . . . . . . . . .  16 
  85.  
  86.           VIDEO UTILITIES . . . . . . . . . . . . . . . . . . . . . . .  18 
  87.                VPSET.COM  . . . . . . . . . . . . . . . . . . . . . . .  18 
  88.                VPCOPY.COM . . . . . . . . . . . . . . . . . . . . . . .  19 
  89.                VPFLIP.COM . . . . . . . . . . . . . . . . . . . . . . .  20 
  90.                VPCLS.COM  . . . . . . . . . . . . . . . . . . . . . . .  21 
  91.                     Table 1: Screen Colors  . . . . . . . . . . . . . .  22 
  92.                VPSTRIPE.COM . . . . . . . . . . . . . . . . . . . . . .  23 
  93.                VPTNT.COM  . . . . . . . . . . . . . . . . . . . . . . .  23 
  94.                VPBH.COM . . . . . . . . . . . . . . . . . . . . . . . .  24 
  95.                VPAT.COM . . . . . . . . . . . . . . . . . . . . . . . .  25 
  96.                VPBOX.COM  . . . . . . . . . . . . . . . . . . . . . . .  26 
  97.                     Table 2: Border Styles  . . . . . . . . . . . . . .  28 
  98.  
  99.           SECURITY AND DIAGNOSTIC UTILITIES . . . . . . . . . . . . . .  29 
  100.                HANG.COM . . . . . . . . . . . . . . . . . . . . . . . .  29 
  101.                REBOOT.COM . . . . . . . . . . . . . . . . . . . . . . .  30 
  102.                WHATIS.COM . . . . . . . . . . . . . . . . . . . . . . .  32 
  103.  
  104.           APPENDIX A: Version History . . . . . . . . . . . . . . . . .  34 
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.                                                                           i  
  117.  
  118.  
  119.           Utility_Belt v1.2                                 Users' Guide 
  120.           -------------------------------------------------------------- 
  121.  
  122.  
  123.                                     THE FINE PRINT 
  124.  
  125.             
  126.           DISCLAIMER - AGREEMENT  
  127.             
  128.           Users of the Utility_Belt shareware collection must accept this 
  129.           disclaimer of warranty:  
  130.  
  131.                "The software programs comprising the Utility_Belt 
  132.                collection are supplied as is.  The author disclaims all 
  133.                warranties, expressed or implied, including, without 
  134.                limitation, the warranties of merchantability and of fitness 
  135.                for any purpose. The author assumes no liability for 
  136.                damages, direct or consequential, which may result from the 
  137.                use of any of the Utility_Belt software programs.  Herne 
  138.                Data Systems reserves the right to make changes, additions 
  139.                and deletions to the Utility_Belt Collection at any time 
  140.                without prior notice."  
  141.             
  142.           This evaluation version of the Utility_Belt collection is a 
  143.           "shareware program" and is provided at no charge to the user for 
  144.           evaluation.  Feel free to share it with your friends, but please 
  145.           do not give it away altered or as part of another system.  The 
  146.           essence of "user-supported" software is to provide personal 
  147.           computer users with quality software without high prices, and yet 
  148.           to provide incentive for programmers to continue to develop new 
  149.           products.  If you find any of the programs useful and find that 
  150.           you continue to use any of the Utility_Belt programs after a 30 
  151.           day trial period, you must make a registration payment of $10 
  152.           (US), $12 (CDN) (plus $2 postage and handling) for any single 
  153.           program in the Utility_Belt collection, or $25 (US), $29 (CDN) 
  154.           (plus $2 postage and handling) for the entire collection to Herne 
  155.           Data Systems Ltd.  Cheque, money order, VISA credit card and 
  156.           corporate/institutional purchase orders are accepted.  The single 
  157.           user registration fee will license one copy for use on any one 
  158.           computer at any one time.  You must treat this software just like 
  159.           a book.  An example is that this software may be used by any 
  160.           number of people and may be freely moved from one computer 
  161.           location to another, so long as there is no possibility of it 
  162.           being used at one location while it's being used at another. Just 
  163.           as a book cannot be read by two different persons at the same 
  164.           time.  
  165.             
  166.           Commercial, corporate and institutional users of Utility_Belt 
  167.           must register and pay for their copies of Utility_Belt within 30 
  168.           days of first use or their license is withdrawn.  Site Licenses 
  169.           are available for $50 (US) or $55 (CDN) for any individual 
  170.           program, or $125 (US) or $135 (CDN) for the entire collection 
  171.           directly from Herne Data Systems Ltd. 
  172.             
  173.           Any individual, corporation or institution distributing 
  174.  
  175.                                                                          ii  
  176.  
  177.  
  178.           Utility_Belt v1.2                                 Users' Guide 
  179.           -------------------------------------------------------------- 
  180.  
  181.           Utility_Belt for any kind of remuneration must first contact 
  182.           Herne Data Systems Ltd. at the address below for authorization.  
  183.           This authorization will be granted automatically to distributors 
  184.           recognized by the ASP as adhering to its guidelines for shareware 
  185.           distributors, and such distributors may begin offering 
  186.           Utility_Belt immediately (However Herne Data Systems Ltd. must 
  187.           still be advised so that the distributor can be kept up-to-date 
  188.           with the latest version of Utility_Belt.).  
  189.             
  190.           You are encouraged to pass a copy of Utility_Belt along to your 
  191.           friends for evaluation.  Please encourage them to register their 
  192.           copy if they find that they can use it.   
  193.  
  194.  
  195.           REGISTRATION BENEFITS 
  196.  
  197.           All registered users will receive a copy of the latest version of 
  198.           the Utility_Belt system, along with free technical support and 
  199.           upgrades for 60 days. 
  200.  
  201.           Registered users can also upgrade to later versions (beyond the 
  202.           initial 60 day free support period) for a nominal update fee of 
  203.           $5 plus $2 postage and handling.  (US or CDN funds). 
  204.  
  205.  
  206.           REGISTRATION AND CUSTOMER SUPPORT ADDRESS 
  207.  
  208.           Please address all registration requests and customer support 
  209.           inquiries to: 
  210.  
  211.                     Herne Data Systems Ltd.,   
  212.                     PO Box 250, Tiverton, ON  N0G 2T0  CANADA 
  213.  
  214.                     voice or FAX   (519)366-2732 
  215.  
  216.           You may also contact us by e-mail addressed to CompuServe ID 
  217.           72060,1153, or Internet address herne@wbb.com.  (We welcome all 
  218.           feedback - either positive or negative). 
  219.             
  220.  
  221.           COMPUSERVE SHAREWARE REGISTRATION SERVICE 
  222.  
  223.           Utility_Belt can now be registered using the CompuServe shareware 
  224.           registration database.  This service lets you pay for shareware 
  225.           registrations through your CompuServe account.  After logging in 
  226.           to CompuServe, type GO SWREG and follow the on screen prompts.  
  227.           The database registration ID number for Utility_Belt is 433.  A 
  228.           registered copy of the latest version of Utility_Belt will be 
  229.           shipped directly to you from Herne Data Systems Ltd. 
  230.  
  231.  
  232.  
  233.  
  234.                                                                         iii  
  235.  
  236.  
  237.           Utility_Belt v1.2                                 Users' Guide 
  238.           -------------------------------------------------------------- 
  239.  
  240.           ASP OMBUDSMAN 
  241.  
  242.           This program is produced by a member of the Association of 
  243.           Shareware Professionals (ASP).  ASP wants to make sure that the 
  244.           shareware principle works for you.  If you are unable to resolve 
  245.           a shareware-related problem with an ASP member by contacting the 
  246.           member directly, ASP may be able to help.  The ASP Ombudsman can 
  247.           help you resolve a dispute or problem with an ASP member, but 
  248.           does not provide technical support for members' products.  Please 
  249.           write to the ASP Ombudsman at: 545 Grover Road, Muskegon, MI 
  250.           49442  USA  or send a Compuserve message via easyplex to ASP 
  251.           Ombudsman 70007,3536  
  252.  
  253.  
  254.  
  255.           DEFINITION OF SHAREWARE  
  256.             
  257.           Shareware distribution gives users a chance to try software 
  258.           before buying it. If you try a Shareware program and continue 
  259.           using it after a reasonable evaluation period, you are expected 
  260.           to register. Individual programs differ on details -- some 
  261.           request registration while others require it, some specify a 
  262.           maximum trial period. With registration, you get anything from 
  263.           the simple right to continue using the software to an updated 
  264.           program with printed manual.  
  265.             
  266.           Copyright laws apply to both Shareware and commercial software, 
  267.           and the copyright holder retains all rights, with a few specific 
  268.           exceptions as stated below. Shareware authors are accomplished 
  269.           programmers, just like commercial authors, and the programs are 
  270.           of comparable quality. (In both cases, there are good programs 
  271.           and bad ones!) The main difference is in the method of 
  272.           distribution. The author specifically grants the right to copy 
  273.           and distribute the software, either to all and sundry or to a 
  274.           specific group. For example, some authors require written 
  275.           permission before a commercial disk vendor may copy their 
  276.           Shareware.  
  277.             
  278.           Shareware is a distribution method, not a type of software. You 
  279.           should find software that suits your needs and pocketbook, 
  280.           whether it's commercial or Shareware. The Shareware system makes 
  281.           fitting your needs easier, because you can try before you buy. 
  282.           And because the overhead is low, prices are low also. Shareware 
  283.           has the ultimate money-back guarantee -- if you don't use the 
  284.           product, you don't pay for it.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.                                                                          iv  
  294.  
  295.  
  296.           Utility_Belt v1.2                                 Users' Guide 
  297.           -------------------------------------------------------------- 
  298.  
  299.  
  300.                                      INTRODUCTION 
  301.  
  302.           Add some pizzazz to your batch files!  Utility_Belt is a 
  303.           collection of batch file, security and diagnostic utilities 
  304.           designed to give an advanced, professional look to even the 
  305.           simplest of batch files.  Each program was designed for a 
  306.           specific purpose.  To see a demonstration of the programs in 
  307.           action, run the batch file BELTDEMO.BAT.  The various programs 
  308.           outlined below are used extensively in this demonstration.  Feel 
  309.           free to copy and modify parts of the demo batch file for your own 
  310.           batch files. 
  311.  
  312.                                        * * * * 
  313.  
  314.                THIS DOCUMENTATION ASSUMES THAT THE READER IS 
  315.                REASONABLY FAMILIAR WITH MS-DOS AND BATCH FILE 
  316.                CONCEPTS.  HOWEVER, BY FOLLOWING THE EXAMPLES GIVEN IN 
  317.                THE TEXT, EVEN A RELATIVELY IN-EXPERIENCED USER CAN 
  318.                CREATE PROFESSIONAL LOOKING BATCH FILES WITH EASE! 
  319.  
  320.                                        * * * * 
  321.  
  322.  
  323.           The following programs are included in the Utility_Belt 
  324.           collection: 
  325.  
  326.           Interactive Utilities: 
  327.  
  328.           SELECT    Allows a user to choose from a list of options and can 
  329.                     be used to direct the flow of the batch file 
  330.                     accordingly.  SELECT is typically used for a menu type 
  331.                     system. 
  332.  
  333.           CONFIRM   Prompts the user for a Yes/No response and can be used 
  334.                     to direct the flow of the batch file accordingly.  
  335.                     CONFIRM is typically used prior to executing any action 
  336.                     which may be destructive, such as erasing a file. 
  337.  
  338.           WAIT      Prompts the user to procede or quit and can be used to 
  339.                     direct the flow of the batch file accordingly.  WAIT is 
  340.                     typically used to prompt a user to do something (like 
  341.                     swap disks) before proceding. 
  342.  
  343.           GETKEY    Waits for a key press from the keyboard and returns a 
  344.                     value based on the ASCII code of the key pressed.  
  345.                     GETKEY is typically used for custom menu type programs. 
  346.  
  347.           SLEEP     Pauses the computer for the specified length of time.  
  348.                     SLEEP is typically used to pause momentarily while a 
  349.                     message is displayed on the screen. 
  350.  
  351.  
  352.                                                                           1  
  353.  
  354.  
  355.           Utility_Belt v1.2                                 Users' Guide 
  356.           -------------------------------------------------------------- 
  357.  
  358.           BLEEP     Sounds a user defined tone (or series of tones) on the 
  359.                     speaker.  BLEEP is typically used prior to any special 
  360.                     alert or warning messages which are displayed by the 
  361.                     batch file. 
  362.  
  363.           TC        TimeCheck returns a value based on time of day or day 
  364.                     of week.  TC is typically used in AUTOEXEC.BAT files to 
  365.                     execute different startup routines based on time of day 
  366.                     and/or day of week. 
  367.  
  368.  
  369.  
  370.           Video Utilities: 
  371.  
  372.           VPSET     Set the current video display page for text modes.  
  373.                     VPSET is typically used to build a screen with the 
  374.                     other video utilities (e.g. VPCOPY, VPCLS, VPBOX, etc.) 
  375.                     then switch to it instantly. 
  376.  
  377.           VPCOPY    Copy one video text page to another.  This allows a 
  378.                     text page to be saved then recalled later. 
  379.  
  380.           VPFLIP    Let the user flip instantly between alternate display 
  381.                     pages that have been created with the other video 
  382.                     programs. 
  383.  
  384.           VPCLS     Clear the screen of the specified video page to a 
  385.                     specified color. 
  386.  
  387.           VPTNT     Clear the current screen to the specified colors in an 
  388.                     explosive effect. 
  389.  
  390.           VPBH      Clear the current screen to the specified colors in a 
  391.                     'black hole' effect. 
  392.  
  393.           VPSTRIPE  Similar to VPCLS, but will produce a striped or rainbow 
  394.                     pattern on the screen.  Stripes can be horizontal or 
  395.                     vertical. 
  396.  
  397.           VPAT      Print a text string at a specified location on the 
  398.                     screen. 
  399.  
  400.           VPBOX     Draws a box of a given size at a given location on the 
  401.                     screen.  Typically used with VPAT to create message 
  402.                     windows on a screen. 
  403.  
  404.  
  405.  
  406.           Security and Diagnostic Utilities: 
  407.  
  408.           HANG      Will lock up a computer and require a power-off/power- 
  409.                     on reset sequence.  HANG is typically used to lock up a 
  410.  
  411.                                                                           2  
  412.  
  413.  
  414.           Utility_Belt v1.2                                 Users' Guide 
  415.           -------------------------------------------------------------- 
  416.  
  417.                     computer if, for example, a user fails on several 
  418.                     attempts to log into a network. 
  419.  
  420.           REBOOT    Software controlled rebooting of the computer.  REBOOT 
  421.                     is typically used after changing or creating a 
  422.                     customized CONFIG.SYS file.  It can also be used to 
  423.                     automatically reset a computer if a user fails to log 
  424.                     into a network correctly. 
  425.  
  426.           WHATIS    A diagnostic program which reports the BIOS and DOS 
  427.                     physical and logical parameters associated with disk 
  428.                     drives. 
  429.  
  430.  
  431.           All of the programs in the Utility_Belt collection were written 
  432.           in assembler to ensure compact, fast code.  (The average size of 
  433.           the programs is less than 2k bytes long!)  Each of the programs 
  434.           is self documenting to a certain extent.  If you run the programs 
  435.           without any command line options, you will get a summary of the 
  436.           syntax and available options. 
  437.  
  438.           In addition to the main programs, the Utility_Belt collection 
  439.           disk will contain other related files: 
  440.  
  441.           ASP.COM        Displays the Association of Shareware 
  442.                          Professionals ombudsman message. 
  443.  
  444.           BELTDEMO.BAT   A demonstration batch file which incorporates the 
  445.                          various programs of the Utility_Belt collection.  
  446.                          Run this file for a good overview. 
  447.  
  448.           BELT.DOC       This documentation file. 
  449.  
  450.           BELT1xx.ZIP    A ZIP file which contains all of the other files 
  451.                          on the disk.  You can upload this file to all of 
  452.                          your favorite BBS's, or pass it around to your 
  453.                          friends. 
  454.  
  455.           UPDATE.DOC     A summary of new features added since the last 
  456.                          release.  This file may not be present, depending 
  457.                          on the version. 
  458.  
  459.           CATALOG.DOC    This file contains a listing of other exciting 
  460.                          Herne Data Systems Ltd. shareware and commercial 
  461.                          software products. 
  462.  
  463.  
  464.  
  465.           TERMINOLOGY AND CONVENTIONS 
  466.  
  467.           All of the programs in the Utility_Belt collection are 'command 
  468.           line driven' (i.e. they rely on options specified on the command 
  469.  
  470.                                                                           3  
  471.  
  472.  
  473.           Utility_Belt v1.2                                 Users' Guide 
  474.           -------------------------------------------------------------- 
  475.  
  476.           line to determine what they should do).  In this documentation, 
  477.           curly braces { } are used to denote the names of parameters that 
  478.           must be supplied for each program, e.g. {list_name}.  Parameters 
  479.           which are also enclosed in square brackets [ ] are optional (e.g. 
  480.           [{item_10}]).  If optional parameters are not specified, default 
  481.           values are assumed.   
  482.  
  483.           Numeric values are entered in normal ASCII decimal fashion (i.e. 
  484.           10 is the number ten).  Text string entries can be any 
  485.           combination of normally printable characters.  Case sense 
  486.           (uppercase and lowercase) are preserved for text strings.  
  487.           Embedded spaces (i.e. the space left between words) are generally 
  488.           allowed, but leading spaces (i.e. any blanks at the beginning of 
  489.           the text) are automatically removed.  ("This ==>  <== is an 
  490.           embedded space".  "  <== This is a leading space.")  Any of the 
  491.           numeric values or strings can include or be substituted by the 
  492.           DOS batch file variables (%1, %2, etc.) to provide more 
  493.           flexibility. 
  494.  
  495.           The required parameters and default values for any optional 
  496.           parameters are listed below in the description for each program.  
  497.           Examples of usage for each program are also given.  In all cases, 
  498.           neither the curly braces, nor the square brackets are actually 
  499.           typed on the command line.  
  500.             
  501.           With the exception of SELECT, all programs requiring multiple 
  502.           parameters must have these parameters separated on the command 
  503.           line by at least one space character.  In order to allow embedded 
  504.           spaces in the parameter strings, SELECT uses a semi-colon ; as a 
  505.           parameter separator character. 
  506.  
  507.           For programs which take a can take a long list of optional 
  508.           parameters (such as SELECT and VPFLIP), three dots ... indicates 
  509.           that you can continue on with similar parameters, up to the 
  510.           maximum number specified by the program. 
  511.  
  512.           Angle brackets < > (a.k.a. less than and greater than signs) are 
  513.           used to denote special keys on the keyboard.  For example, <Esc> 
  514.           refers to the single key marked ESC or ESCAPE; while <Enter> 
  515.           refers to the ENTER or RETURN key. 
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.                                                                           4  
  530.  
  531.  
  532.           Utility_Belt v1.2                                 Users' Guide 
  533.           -------------------------------------------------------------- 
  534.  
  535.           DOS ERRORLEVEL and Batch Files 
  536.  
  537.           This documentation is not intended to be a comprehensive course.  
  538.           I know this is obvious, but it is worth saying anyway: One of the 
  539.           most often overlooked sources of information is the manuals and 
  540.           user guides which come with MS-DOS!  If you want a different 
  541.           perspective on batch files, there are many excellent books and 
  542.           magazine articles about MS-DOS batch file programming at all 
  543.           levels from introductory to advanced.  
  544.           However, before describing each program, a brief description of 
  545.           how DOS responds to the interactive utilities is in order. 
  546.  
  547.           The user response utilities in the collection (SELECT, WAIT and 
  548.           CONFIRM, and GETKEY) rely on the DOS ERRORLEVEL variable to 
  549.           direct batch file flow.  In order for the batch files to function 
  550.           correctly, a basic understanding of ERRORLEVEL is required. 
  551.  
  552.           When any program terminates and returns control to DOS (or the 
  553.           batch file which initiated it), it can set a DOS variable called 
  554.           ERRORLEVEL.  Normally, this would have a value of 0 which 
  555.           indicates that the program successfully completed its task.  
  556.           Other values can be set and may indicate either an error in the 
  557.           program, or some other data that the program wishes to pass on to 
  558.           subsequent programs in a batch file.  This value can be detected 
  559.           and used to control the flow in batch files.  The general 
  560.           procedure in a batch file is: 
  561.  
  562.                program_or_command_name 
  563.                IF ERRORLEVEL x GOTO {label} 
  564.  
  565.           where program_or_command_name is the name of a DOS command, .EXE, 
  566.           .BAT or .COM program file (e.g. FORMAT), x is the value (from 0 
  567.           to 255) and [label] is a statement in the batch file to go to.  
  568.           For example: 
  569.  
  570.                IF ERRORLEVEL 5 GOTO ITEM5 
  571.                IF ERRORLEVEL 4 GOTO ITEM4 
  572.                IF ERRORLEVEL 3 GOTO ITEM3 
  573.                IF ERRORLEVEL 2 GOTO ITEM2 
  574.                IF ERRORLEVEL 1 GOTO ITEM1 
  575.  
  576.           :ITEM5 
  577.           (some commands here) 
  578.           :ITEM4 
  579.           (some more commands here) 
  580.           :ITEM3 
  581.           (etc) 
  582.           :ITEM2 
  583.           (etc) 
  584.           :ITEM1 
  585.           (etc) 
  586.  
  587.  
  588.                                                                           5  
  589.  
  590.  
  591.           Utility_Belt v1.2                                 Users' Guide 
  592.           -------------------------------------------------------------- 
  593.  
  594.           Notice that the IF ERRORLEVEL x statements are arranged from 
  595.           highest value to lowest value.  This is required due to a quirk 
  596.           in DOS.  The IF ERRORLEVEL command actually does a 'greater than 
  597.           or equal' type of comparison.  If ERRORLEVEL was 5 and the first 
  598.           statement was IF ERRORLEVEL 1, then since 5 is greater than or 
  599.           equal to 1, the statement would be executed, which is not what we 
  600.           would normally want.  All this may seem a bit confusing at first, 
  601.           but if you remember that all IF ERRORLEVEL statements must be 
  602.           arranged in descending order (i.e. from high to low as shown in 
  603.           the example above), then you can't go wrong. 
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.                                                                           6  
  648.  
  649.  
  650.           Utility_Belt v1.2                                 Users' Guide 
  651.           -------------------------------------------------------------- 
  652.  
  653.  
  654.                                 INTERACTIVE UTILITIES 
  655.  
  656.  
  657.           One of the most frequent complaints about DOS batch file 
  658.           programming is the inability to get meaningful input from the 
  659.           user.  Sure, DOS batch files have the 'PAUSE' command, but all 
  660.           that does is ask you to press a key.  The batch file programmer 
  661.           has no easy way to tell which key was pressed. 
  662.  
  663.           The five interactive utilities (SELECT, WAIT, CONFIRM, GETKEY, 
  664.           and SLEEP) in the Utility_Belt allow the programmer to check 
  665.           which key was pressed and direct the flow of batch file 
  666.           accordingly.  Each utility that reads a key press will clear the 
  667.           keyboard buffer before getting the key.  This prevents extraneous 
  668.           key presses from disrupting the batch file (e.g. if an over- 
  669.           anxious user presses a key before they should).  The time clock 
  670.           utility TC will branch a program based on time of day or day of 
  671.           week. 
  672.  
  673.  
  674.  
  675.           SELECT.COM 
  676.  
  677.           SELECT allows a user to choose an option from a list of items and 
  678.           direct the flow of the batch file accordingly.  It can be used 
  679.           for anything from simple user queries to a sophisticated menuing 
  680.           system.  SELECT will set the DOS ERRORLEVEL value corresponding 
  681.           to the selected choice.  Two syntaxes are supported.  The first 
  682.           is: 
  683.  
  684.                SELECT {list_name};{item_1};[{item_2}; ... ;{item_10}] 
  685.  
  686.           where:    {list_name}    A title that is printed in the menu 
  687.                                    title block.  The title can be up to 20 
  688.                                    characters long.  Longer titles will be 
  689.                                    truncated to 20 characters. 
  690.  
  691.                     {item_1} (etc) The items in the menu list.  Up to 10 
  692.                                    items can be listed, each up to 15 
  693.                                    characters long.  Longer items will be 
  694.                                    truncated to 15 characters. 
  695.  
  696.           The total length of the text string must be less than 120 
  697.           characters.  Each item in the list must be separated by a semi- 
  698.           colon (;).  All printable characters (except ; which is used as 
  699.           the separator, or /N at the beginning of {list_name} which is 
  700.           used as a switch to denote the second form of the command), 
  701.           including embedded spaces, are allowed.  Uppercase and lowercase 
  702.           letters are preserved.  SELECT  will print a header message which 
  703.           includes the {list_name}, followed by the item list and a footer 
  704.           message which prompts the user to press the key 'A' to x, where x 
  705.  
  706.                                                                           7  
  707.  
  708.  
  709.           Utility_Belt v1.2                                 Users' Guide 
  710.           -------------------------------------------------------------- 
  711.  
  712.           depends on the number of items in the list.  SELECT will accept 
  713.           either uppercase or lowercase key press responses.  If the <Esc> 
  714.           key is pressed, SELECT will return an error code corresponding to 
  715.           'no selection made'.  If any other key is pressed, SELECT will 
  716.           beep and wait for the next key press. 
  717.  
  718.           For example: 
  719.  
  720.                SELECT Main Menu;WordProcessor;SpreadSheet;Graphics;Utilties 
  721.  
  722.           will display the following menu on the screen: 
  723.  
  724.  
  725.                  Main Menu 
  726.  
  727.                     A: WordProcessor 
  728.                     B: SpreadSheet 
  729.                     C: Graphics 
  730.                     D: Utilities 
  731.  
  732.                  PRESS: 'A' to 'D' letter key to select an item; or 
  733.                         <Esc> to QUIT without selecting any. 
  734.  
  735.           When one of the available choices is made, SELECT will return the 
  736.           following ERRORLEVEL values: 
  737.  
  738.           --------------+----------------- 
  739.           Key Pressed    ERRORLEVEL value 
  740.           --------------+----------------- 
  741.                <Esc>     0 
  742.                A         1 
  743.                B         2 
  744.                C         3 
  745.                D         4 
  746.           etc 
  747.                J         10 
  748.           --------------+----------------- 
  749.  
  750.  
  751.           The second syntax supported by SELECT is: 
  752.  
  753.                SELECT /N{nn} 
  754.  
  755.           where {nn} is the number of choices, from 1 to 10.  With this 
  756.           form, no header, menu list or footer messages are displayed.  
  757.           SELECT will just wait for a key to be pressed (within the range 
  758.           of 'A' to x, or <Esc>, as above), then return the corresponding 
  759.           ERRORLEVEL value.  For example: 
  760.  
  761.                SELECT /N5 
  762.  
  763.           will wait for a key press in the range of A to E, or <Esc> and 
  764.  
  765.                                                                           8  
  766.  
  767.  
  768.           Utility_Belt v1.2                                 Users' Guide 
  769.           -------------------------------------------------------------- 
  770.  
  771.           then return an ERRORLEVEL value of 1 to 5 or 0.   
  772.  
  773.           Continuing with the first example listed above, a sample batch 
  774.           file (MENU1.BAT) using SELECT might consist of: 
  775.  
  776.                REM ===   MENU1.BAT 
  777.                @ECHO OFF 
  778.                :MAIN 
  779.  
  780.                REM ===   clear screen and display menu options 
  781.                CLS 
  782.                SELECT Main Menu;WordProcessor;SpreadSheet;Graphics;Utilties 
  783.  
  784.                REM ===   interpret ERRORLEVEL codes and branch to selection 
  785.                IF ERRORLEVEL 4 GOTO UTIL 
  786.                IF ERRORLEVEL 3 GOTO GRAPH 
  787.                IF ERRORLEVEL 2 GOTO SPREAD 
  788.                IF ERRORLEVEL 1 GOTO WORDPRO 
  789.  
  790.                REM ===   ERRORLEVEL = 0 if <Esc> key pressed 
  791.                ECHO NO SELECTION MADE 
  792.                GOTO END 
  793.  
  794.                REM ===   execute main menu selections 
  795.                :UTIL 
  796.  
  797.                REM ===   present a sub-menu 
  798.                CLS 
  799.                SELECT Utility Menu;Norton;MAXI Disk 
  800.                IF ERRORLEVEL 2 GOTO NOR 
  801.                IF ERRORLEVEL 1 GOTO MAX 
  802.                REM ===   return to main menu if <Esc> pressed on sub-menu 
  803.                GOTO MAIN 
  804.  
  805.                :NOR 
  806.                CD\UTILITY 
  807.                NU 
  808.                GOTO MAIN 
  809.  
  810.                :MAX 
  811.                CD\MAXIDISK 
  812.                MAX3 
  813.                GOTO MAIN 
  814.                :GRAPH 
  815.                CD\GRAPH 
  816.                HG 
  817.                GOTO MAIN 
  818.  
  819.                :SPREAD 
  820.                CD\SPREAD 
  821.                123 
  822.                GOTO MAIN 
  823.  
  824.                                                                           9  
  825.  
  826.  
  827.           Utility_Belt v1.2                                 Users' Guide 
  828.           -------------------------------------------------------------- 
  829.  
  830.                :WORDPRO 
  831.                CD\WORDPRO 
  832.                WP 
  833.                GOTO MAIN 
  834.  
  835.                :END 
  836.  
  837.           As shown with item 4 in the main menu list (:UTIL), several 
  838.           levels of SELECT can be 'nested' or used in a batch file menu 
  839.           system to create multiple menu levels.  In the above example, as 
  840.           each program ends, the user will be returned to the start of the 
  841.           main menu.  Also, if the <Esc> key is pressed on the main menu, 
  842.           the user will exit to DOS.  If the <Esc> key is pressed while in 
  843.           the Utilities sub-menu, the user will be returned to the top of 
  844.           the main menu. 
  845.  
  846.           If no parameters are specified on the command line, SELECT will 
  847.           display a summary of the program options.   
  848.  
  849.  
  850.  
  851.           CONFIRM.COM 
  852.  
  853.           CONFIRM will display a prompt and accept a Y (for yes) or N (for 
  854.           no) key input.  All other key presses will produce an error beep 
  855.           and will be ignored.  CONFIRM is used to present a YES/NO 
  856.           question and will return an ERRORLEVEL of 0 for a yes response, 
  857.           or 1 for a no response.  It is typically used prior to executing 
  858.           any action which may be destructive, such as erasing a file.  The 
  859.           syntax is: 
  860.  
  861.                CONFIRM {text_string} 
  862.  
  863.           {text_string} can be up to 120 characters long, and can contain 
  864.           any printable character.  Uppercase and lowercase characters are 
  865.           preserved.  CONFIRM will display a header message, the 
  866.           {text_string} followed by a question mark (?), then a footer 
  867.           message prompting the user to press either the Y or N key. 
  868.  
  869.           For example, the command line: 
  870.  
  871.                CONFIRM Delete all the files 
  872.  
  873.           will produce the display: 
  874.  
  875.  
  876.                Do you wish to: 
  877.  
  878.                     Delete all the files? 
  879.  
  880.                Press 'Y' for YES or 'N' for NO 
  881.  
  882.  
  883.                                                                          10  
  884.  
  885.  
  886.           Utility_Belt v1.2                                 Users' Guide 
  887.           -------------------------------------------------------------- 
  888.  
  889.           Typical usage in a batch file (WIPEDISK.BAT) might be: 
  890.  
  891.                REM ===   WIPEDISK.BAT 
  892.                @ECHO OFF 
  893.  
  894.                REM ===   ask user to confirm action before doing it 
  895.                CONFIRM Delete all the files on %1 
  896.                IF ERRORLEVEL 1 GOTO END 
  897.                DELETE %1*.* 
  898.                :END 
  899.  
  900.           In this example with the command line WIPEDISK A:, if the user 
  901.           pressed the N key for no, the batch file would branch to the :END 
  902.           statement and nothing would happen.  If the Y for yes key was 
  903.           pressed, the DOS command DELETE A:*.* would be performed to erase 
  904.           everything on drive A:. 
  905.  
  906.           If no parameters are specified on the command line, CONFIRM will 
  907.           display a summary of its syntax. 
  908.  
  909.  
  910.  
  911.           WAIT.COM 
  912.  
  913.           WAIT will display a prompt and accept a key press.  If the <Esc> 
  914.           is pressed, an ERRORLEVEL of 1 will be returned.  All other key 
  915.           presses will produce an ERRORLEVEL of 0.  WAIT is used to pause a 
  916.           batch file until a specific action is performed by the user, then 
  917.           branch to one of two outcomes.  It is typically used prior to 
  918.           executing any action which may require user intervention, such as 
  919.           inserting a disk.  The syntax is: 
  920.  
  921.                WAIT {text_string} 
  922.  
  923.           {text_string} can be up to 120 characters long, and can contain 
  924.           any printable character.  Uppercase and lowercase characters are 
  925.           preserved.  WAIT will display a header message, the 
  926.           {text_string}, then a footer message prompting the user to press 
  927.           either the <Esc> key to quit or any other key to continue. 
  928.  
  929.           For example, the command line: 
  930.  
  931.                WAIT Insert disk in drive A: 
  932.  
  933.           will produce the display: 
  934.  
  935.  
  936.                Please: 
  937.  
  938.                     Insert disk in drive A: 
  939.  
  940.                Then press: <Esc> to ABORT or 
  941.  
  942.                                                                          11  
  943.  
  944.  
  945.           Utility_Belt v1.2                                 Users' Guide 
  946.           -------------------------------------------------------------- 
  947.  
  948.                            any other key to CONTINUE 
  949.  
  950.  
  951.           Typical usage in a batch file (ALLCOPY.BAT) might be: 
  952.  
  953.                REM ===   ALLCOPY.BAT 
  954.  
  955.                @ECHO OFF 
  956.                WAIT Insert disk with files to copy in drive %1 
  957.                IF ERRORLEVEL 1 GOTO END 
  958.                COPY %1*.* %2 
  959.                :END 
  960.  
  961.           To copy all the files from drive A: to drive C:, you would use 
  962.           the command:  ALLCOPY A: C:.  In this example, if the user 
  963.           pressed the <Esc> key to ABORT, the batch file would branch to 
  964.           the :END statement and nothing would happen.  If any other key 
  965.           was pressed, the DOS command COPY A:*.* C: would be performed to 
  966.           copy the file from the drive A: to drive C:. 
  967.  
  968.           If no parameters are specified on the command line, WAIT will 
  969.           display a summary of its syntax. 
  970.  
  971.  
  972.  
  973.           GETKEY.COM 
  974.  
  975.           GETKEY waits for a key press from the keyboard and returns an 
  976.           ERRORLEVEL equal to the ASCII code of the key pressed.  GETKEY 
  977.           does not display any prompt.  The syntax is: 
  978.  
  979.                GETKEY {key_mode} 
  980.  
  981.           where {key_mode} can be any of: 
  982.  
  983.             A  will accept all regular keys (numbers, symbols, letters, 
  984.                <Enter>, <Esc>) that have an ASCII code associated with 
  985.                them.  GETKEY will return an ERRORLEVEL value of 1 to 255 
  986.                corresponding to the ASCII code of the key pressed.  The 
  987.                'special' keys, such as the function keys, <PgUp>, <Home>, 
  988.                <End>, etc., will all return an ERRORLEVEL value of 0. 
  989.  
  990.             #  will accept numeric keys only (numbers 0 to 9), either from 
  991.                the main keyboard or from the numeric keypad.  GETKEY will 
  992.                return an ERRORLEVEL value of 48 to 57, corresponding to the 
  993.                ASCII code for numerals 0 to 9. 
  994.  
  995.             N  as with the # option, but will return an ERRORLEVEL value of 
  996.                0 to 9, corresponding to the numeric value of the key 
  997.                pressed. 
  998.  
  999.  
  1000.  
  1001.                                                                          12  
  1002.  
  1003.  
  1004.           Utility_Belt v1.2                                 Users' Guide 
  1005.           -------------------------------------------------------------- 
  1006.  
  1007.           The ERRORLEVEL returned by GETKEY can be used by the batchfile to 
  1008.           branch to an appropriate routine, or it can be ignored if just 
  1009.           any key press is required to continue, like the DOS PAUSE 
  1010.           command.  Unlike the DOS PAUSE command, however, GETKEY will not 
  1011.           display a prompt. 
  1012.  
  1013.           Typical usage in a batch file called DIRBC.BAT might be: 
  1014.  
  1015.                REM ===    DIRBC.BAT 
  1016.                @ECHO OFF 
  1017.                REM ===    display directory of all batch files 
  1018.                DIR %1*.BAT/w 
  1019.                REM === wait until user presses a key to display .COM files 
  1020.                ECHO Press any key to display .COM files 
  1021.                GETKEY A 
  1022.                REM ===    display directory of all .COM files 
  1023.                DIR %1*.COM/W     
  1024.  
  1025.           This example ignores the ERRORLEVEL return code.  To view all the 
  1026.           .BAT and .COM files on drive A: with this example, you would use: 
  1027.  
  1028.                DIRBC A: 
  1029.  
  1030.  
  1031.           If no parameters are specified on the command line, GETKEY will 
  1032.           display a summary of its syntax. 
  1033.  
  1034.  
  1035.           SLEEP.COM 
  1036.  
  1037.           SLEEP is used to pause the execution of a batch file for a given 
  1038.           length of time.  Optionally, a message may be displayed on the 
  1039.           screen and/or a key press can be used to cancel the 'sleep' 
  1040.           period.  Four separate forms of the command are available: 
  1041.  
  1042.                SLEEP /N{nn} 
  1043.  
  1044.                SLEEP /C{nn} 
  1045.  
  1046.                SLEEP /T{nn};{message} 
  1047.  
  1048.                SLEEP /K{nn};{message} 
  1049.  
  1050.           In each case, {nn} is the sleep period in seconds (approximate).  
  1051.           {nn} must be an integer in the range of 1 to 65535.  With the 
  1052.           /N{nn} option, SLEEP will wait for the specified length of time, 
  1053.           then return control to the batch file.  The /C{nn} option is 
  1054.           similar, but any key press will cancel the sleep and return to 
  1055.           the batch file immediately.  The /T and /K options will display a 
  1056.           message on the screen during the sleep period.  /T will wait the 
  1057.           specified time, while /K can be cancelled with a key press.  
  1058.           {message} can be up to 120 characters long, and can contain any 
  1059.  
  1060.                                                                          13  
  1061.  
  1062.  
  1063.           Utility_Belt v1.2                                 Users' Guide 
  1064.           -------------------------------------------------------------- 
  1065.  
  1066.           printable character.  Uppercase and lowercase characters are 
  1067.           preserved.  The /T{nn} (or /K{nn}) and {message} must be 
  1068.           separated by a semi-colon (;). 
  1069.  
  1070.           For example: 
  1071.  
  1072.                SLEEP /N10 
  1073.  
  1074.           will pause the computer for about 10 seconds, then resume. 
  1075.  
  1076.                SLEEP /C60 
  1077.  
  1078.           will pause the computer for 60 seconds.  If at any time during 
  1079.           this period, the user presses a key, the sleep period is 
  1080.           immediately cancelled. 
  1081.  
  1082.                SLEEP /T30;Waiting for 30 seconds . . . 
  1083.  
  1084.           will display a header message, then "Waiting for 30 seconds . . 
  1085.           ." and pause the computer for 30 seconds. 
  1086.  
  1087.                SLEEP /K30;Waiting for 30 seconds . . . 
  1088.  
  1089.           is similar to the previous example, except a key press can be 
  1090.           used to cancel the sleep period. 
  1091.  
  1092.           A typical usage in a batch file might be to display a greeting 
  1093.           message on the screen just long enough to inform the user, then 
  1094.           continue on with the batch file GOODMORN.BAT: 
  1095.  
  1096.                REM ===   GOODMORN.BAT 
  1097.  
  1098.                @ECHO OFF 
  1099.                VPSTRIPE 0 V 
  1100.                VPBOX 0 1 9 1 8 20 16 60 
  1101.                VPAT 0 1 14 12 30 Good Morning !! 
  1102.                SLEEP /C10 
  1103.  
  1104.  
  1105.           (Note: the VPSTRIPE, VPBOX and VPAT commands are explained below 
  1106.           in the video utilities section.) 
  1107.  
  1108.           If no parameters are specified on the command line, SLEEP will 
  1109.           display a summary of its syntax and options. 
  1110.  
  1111.  
  1112.           BLEEP.COM 
  1113.  
  1114.           Sounds a user defined tone (or series of tones) on the speaker.  
  1115.           BLEEP is typically used prior to any special alert or warning 
  1116.           messages which are displayed by the batch file.  The syntax is: 
  1117.  
  1118.  
  1119.                                                                          14  
  1120.  
  1121.  
  1122.           Utility_Belt v1.2                                 Users' Guide 
  1123.           -------------------------------------------------------------- 
  1124.  
  1125.                BLEEP {repeats} {freq} {length} {pause} [;{repeats} {freq} 
  1126.                          {length} {pause}; ....] 
  1127.  
  1128.           where: 
  1129.  
  1130.           {repeats} is the number of times the note is to be repeated; 
  1131.  
  1132.           {freq}    is the frequency of the note in Hertz (cycles per 
  1133.                     second).  If no frequency is specified, a value of 1200 
  1134.                     is assumed; 
  1135.  
  1136.           {length}  is the duration of the note in 'system timer ticks'.  
  1137.                     There are approximately 18 timer ticks per second.  If 
  1138.                     no length is specified, a value of 2 is assumed; 
  1139.  
  1140.           {pause}   is the duration of the rest period between notes, in 
  1141.                     system timer ticks.  If no pause is specified, a value 
  1142.                     of 2 is assumed. 
  1143.  
  1144.  
  1145.           For example,  
  1146.  
  1147.                BLEEP 2 1000 3 2 
  1148.  
  1149.           will sound a 1000 Hz note for 3 timer ticks (~ 1/6 second) then 
  1150.           wait for 2 timer ticks. 
  1151.  
  1152.           Default values are provided for most of the parameters.  If the 
  1153.           defaults are used, the only required parameter is the {count} 
  1154.           value.  If all of the parameters are not specified, the command 
  1155.           line must be terminated with a semi-colon (;).  For example: 
  1156.  
  1157.                BLEEP 2; 
  1158.  
  1159.           will sound a sequence of two default (1200 Hz) notes, each for a 
  1160.           default time of 2 timer ticks followed by a default pause of 2 
  1161.           timer ticks. 
  1162.  
  1163.                BLEEP 2 800 3; 
  1164.  
  1165.           will sound a sequence of 2 800 Hz notes for three ticks followed 
  1166.           by a two tick pause. 
  1167.  
  1168.           More than one tone can be sounded in a given sequence.  In this 
  1169.           case each group of parameters must be separated by a semi-colon 
  1170.           (;).   For example: 
  1171.  
  1172.                BLEEP 1 400 2 1;2 600 3 2;1 800;2; 
  1173.  
  1174.           will sound the following sequence of 6 notes: 
  1175.  
  1176.             -  one note at 400 Hz for 2 ticks with a 1 tick pause; 
  1177.  
  1178.                                                                          15  
  1179.  
  1180.  
  1181.           Utility_Belt v1.2                                 Users' Guide 
  1182.           -------------------------------------------------------------- 
  1183.  
  1184.             -  2 notes at 600 Hz for 3 ticks each with a 2 tick pause; 
  1185.  
  1186.             -  1 note at 800 Hz for 3 ticks with a 2 tick pause; 
  1187.  
  1188.             -  2 notes at 800 Hz for 3 ticks each with a 2 tick pause. 
  1189.  
  1190.           Note that for a multiple tone sequence, if parameters are not 
  1191.           specified, those used for the previous tone are assumed as the 
  1192.           new default values. 
  1193.  
  1194.  
  1195.           If no parameters are specified on the command line, BLEEP will 
  1196.           display a summary of its syntax and options. 
  1197.  
  1198.  
  1199.           TC.COM 
  1200.  
  1201.           TC checks the system clock and returns an ERRORLEVEL based on 
  1202.           time and/or day of week.  TC does not display any prompt.  TC has 
  1203.           three functions with the following syntax: 
  1204.  
  1205.                      TC  xx:xx yy:yy [/Weekend] 
  1206.  
  1207.                      TC /H 
  1208.  
  1209.                      TC /D 
  1210.  
  1211.           The first function returns an ERRORLEVEL code based on whether or 
  1212.           not the current time is inside or outside of the range specified 
  1213.           by xx:xx to yy:yy.  All times are based on a 24 hour clock (eg. 
  1214.           TC 08:00 16:00  represents 8:00 am to 4:00 pm).  The option /W 
  1215.           swtich tells TC to check if the current day is a weekday (monday 
  1216.           to friday) or a weekend (saturday or sunday).  ERRORLEVEL return 
  1217.           codes are: 
  1218.  
  1219.           -------------------+--------------+----------------+------------ 
  1220.           If current time is:  before xx:xx   xx:xx to yy:yy   after yy:yy 
  1221.           -------------------+--------------+----------------+------------ 
  1222.           Normal return code         2               1              2 
  1223.           Weekend (if /W set)        5               4              5 
  1224.           -------------------+--------------+----------------+------------ 
  1225.  
  1226.           This form of TC is most often used in an AUTOEXEC.BAT file that 
  1227.           is designed to perform different actions based day time and night 
  1228.           time routines.  For example, if you normally load remote access 
  1229.           software on your PC before leaving work each day, you can use TC 
  1230.           to automatically load the software for you on a reboot. 
  1231.  
  1232.           If /H option is used, return code is equal to hour of current 
  1233.           time (0 to 23). 
  1234.  
  1235.           If /D option is used, return code is equal to day of week (1=Sun, 
  1236.  
  1237.                                                                          16  
  1238.  
  1239.  
  1240.           Utility_Belt v1.2                                 Users' Guide 
  1241.           -------------------------------------------------------------- 
  1242.  
  1243.           2=Mon, etc). 
  1244.  
  1245.           The ERRORLEVEL returned by TC can be used by the batchfile to 
  1246.           branch to an appropriate routine. 
  1247.  
  1248.           Typical usage in an AUTOEXEC.BAT might be: 
  1249.  
  1250.                @ECHO OFF 
  1251.                REM ===    determine if current time is normal working time 
  1252.                TC 08:00 16:00 /W 
  1253.                IF ERRORLEVEL 2 GOTO ATHOME 
  1254.                REM ===    anytime not between 8:00 am and 4:00 pm,  
  1255.                REM ===    Mon to Fri will branch to ATHOME 
  1256.                :ATWORK 
  1257.                REM ===    do normal at work startup routine 
  1258.  
  1259.                GOTO END 
  1260.  
  1261.                :ATHOME 
  1262.                REM ===   do normal end of day stuff, like loading remote 
  1263.                REM ===   access software 
  1264.  
  1265.                :END 
  1266.  
  1267.           Another usage might be based on day of week: 
  1268.  
  1269.                @ECHO OFF 
  1270.                REM ===   determine day of week 
  1271.                TC /D 
  1272.                IF ERRORLEVEL 7 GOTO SATURDAY 
  1273.                IF ERRORLEVEL 6 GOTO FRIDAY 
  1274.                IF ERRORLEVEL 5 GOTO THURSDAY 
  1275.                IF ERRORLEVEL 4 GOTO WEDNESDAY 
  1276.                IF ERRORLEVEL 3 GOTO TUESDAY 
  1277.                IF ERRORLEVEL 2 GOTO MONDAY 
  1278.                IF ERRORLEVEL 1 GOTO SUNDAY 
  1279.  
  1280.                REM ===   put daily startup routines here 
  1281.  
  1282.                :SATURDAY 
  1283.                :FRIDAY 
  1284.                :THURSDAY 
  1285.                :WEDNESDAY 
  1286.                :TUESDAY 
  1287.                :MONDAY 
  1288.                :SUNDAY 
  1289.  
  1290.  
  1291.           If no parameters are specified on the command line, TC will 
  1292.           display a summary of its syntax. 
  1293.  
  1294.  
  1295.  
  1296.                                                                          17  
  1297.  
  1298.  
  1299.           Utility_Belt v1.2                                 Users' Guide 
  1300.           -------------------------------------------------------------- 
  1301.  
  1302.  
  1303.                                    VIDEO UTILITIES 
  1304.  
  1305.  
  1306.           All video display adaptors, except for the original IBM 
  1307.           Monochrome Display Adaptor (MDA) have the capability to access 
  1308.           more than one video 'page'.  The Color Graphics Adaptor (CGA) has 
  1309.           4 video pages in 80 column text mode, while the Enhanced Graphics 
  1310.           Adaptor (EGA) and the Video Graphics Array (VGA) displays each 
  1311.           have 8 video text pages.  Having more than one video page lets a 
  1312.           user switch display screens instantly.  This can be used as an 
  1313.           easy method to save output screens, create overlapping screen 
  1314.           windows, etc.  Each page can have its own text, colors, cursor 
  1315.           location, etc. and can be written to or erased without affecting 
  1316.           the other pages.  Only one display page is visible at a time, but 
  1317.           any page can be made visible, not just the default page (0).  
  1318.  
  1319.           Why don't many software programs take advantage of the multiple 
  1320.           text pages that are available?  Probably the main reason is 
  1321.           compatibility with older equipment.  In order to sell the most 
  1322.           software, you design it to work on the 'lowest common 
  1323.           denominator'.  In the case of video displays, this is the good 
  1324.           old MDA, with its single display page. 
  1325.  
  1326.           The video utilities in the Utility_Belt package provide a 
  1327.           comprehensive set of tools to access all of the text mode video 
  1328.           pages available on CGA, EGA and VGA displays.  With the exception 
  1329.           of the instruction prompt printed by VPFLIP, none of the video 
  1330.           utilities will display a header message of any kind when they are 
  1331.           used.  This ensures that such messages do not encroach upon your 
  1332.           video displays. 
  1333.  
  1334.  
  1335.  
  1336.  
  1337.           VPSET.COM 
  1338.  
  1339.           VPSET is used to set the current video display page for text 
  1340.           modes.  VPSET is typically used to instantly switch to a a screen 
  1341.           which was built in the background with the other video utilities 
  1342.           (such as VPCOPY, VPBOX, VPAT, etc).  The syntax is: 
  1343.  
  1344.                VPSET {video_page} [{cursor_line}] 
  1345.  
  1346.  
  1347.           where: 
  1348.           {video_page}   is the number of the video page to switch to; and 
  1349.  
  1350.           {cursor_line}  is the screen line on the new page to place the 
  1351.                          cursor.  
  1352.  
  1353.           {video_page} can have a value of 0 to 3 for the CGA display and 0 
  1354.  
  1355.                                                                          18  
  1356.  
  1357.  
  1358.           Utility_Belt v1.2                                 Users' Guide 
  1359.           -------------------------------------------------------------- 
  1360.  
  1361.           to 7 for the EGA or VGA.  {cursor_line} normally has a value of 0 
  1362.           to 24, with 0 being the top of the screen and 24 being the 
  1363.           bottom.  On some EGA and VGA modes, {cursor_line} can be up to 49 
  1364.           or more.  If {cursor_line} is omitted, line 0 (i.e. the top of 
  1365.           the page) is assumed.  
  1366.  
  1367.           For example: 
  1368.  
  1369.                VPSET 2 15 
  1370.  
  1371.           will set the currently displayed video page to 2 and set the 
  1372.           cursor on line 15. 
  1373.  
  1374.           VPSET can be used to switch to a screen which has been built 
  1375.           using other video commands.  When the VPSET command is issued, it 
  1376.           will look as though the new screen appears instantly.   
  1377.  
  1378.           VPSET can also be used with normal DOS commands to change the 
  1379.           screen where program output is displayed.  For example, the batch 
  1380.           file SAVEDIR.BAT will keep a copy of the disk directory on video 
  1381.           page 3: 
  1382.  
  1383.                REM ===   SAVEDIR.BAT 
  1384.                @ECHO OFF 
  1385.                VPSET 3 
  1386.                DIR %1*.*/W 
  1387.                VPSET 0 
  1388.  
  1389.           By using the command SAVEDIR A:, you can keep a copy of the 
  1390.           directory of A: drive for future reference.  To see the directory 
  1391.           again, use the command: 
  1392.  
  1393.                VPSET 3 22 
  1394.  
  1395.           The directory will be instantly displayed and you do not even 
  1396.           have to have the disk still in your drive!  To switch back to the 
  1397.           normal screen, use the command: 
  1398.  
  1399.                VPSET 0 
  1400.  
  1401.           (In the above example, you could also use the command VPFLIP (see 
  1402.           below) to flip through several video pages and display their 
  1403.           contents in sequence.) 
  1404.  
  1405.           If no parameters are specified on the command line, VPSET will 
  1406.           display a summary of its syntax and options. 
  1407.  
  1408.  
  1409.  
  1410.           VPCOPY.COM 
  1411.  
  1412.           VPCOPY will copy the contents of one video text page to another, 
  1413.  
  1414.                                                                          19  
  1415.  
  1416.  
  1417.           Utility_Belt v1.2                                 Users' Guide 
  1418.           -------------------------------------------------------------- 
  1419.  
  1420.           complete with all screen attributes (colors).  This allows a text 
  1421.           page to be saved then recalled later.  It also allows multiple 
  1422.           copies of a page to be created, each of which can then be 
  1423.           modified without affecting the others (e.g. for creating a series 
  1424.           of seemingly overlapping pop-up windows).  The syntax is: 
  1425.  
  1426.                VPCOPY {from_page} {to_page} 
  1427.  
  1428.           where:  
  1429.  
  1430.           {from_page}    is the video page being copied from; and  
  1431.  
  1432.           {to_page}      is the page being copied to.   
  1433.  
  1434.           Note that any existing contents of the {to_page} will be 
  1435.           destroyed.  Both {from_page} and {to_page} have a range of 0 to 3 
  1436.           for the CGA display and 0 to 7 for the EGA and VGA displays. 
  1437.  
  1438.           For example: 
  1439.  
  1440.                VPCOPY 0 2 
  1441.  
  1442.           will copy the contents of video page 0 to page 2.  Try the 
  1443.           following short command sequence, either in a batch file or by 
  1444.           typing it in directly on the command line: 
  1445.  
  1446.                CLS 
  1447.                DIR/W 
  1448.                VPSET 2 
  1449.                CLS 
  1450.                VPCOPY 0 2 
  1451.  
  1452.           What you will see after the VPCOPY step is the directory that was 
  1453.           originally displayed on the other page suddenly appearing.  
  1454.           (Don't forget to go back to the default page with a VPSET 0 when 
  1455.           you are done.) 
  1456.  
  1457.           If no parameters are specified on the command line, VPCOPY will 
  1458.           display a summary of its syntax and options. 
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.           VPFLIP.COM 
  1465.  
  1466.           VPFLIP will let the user flip instantly between alternate display 
  1467.           pages that have been created with the other video commands.  Up 
  1468.           to eight video pages can be displayed in any sequence.  When 
  1469.           exiting VPFLIP, you are returned to the original video page (i.e. 
  1470.           the display page which was showing when the VPFLIP command was 
  1471.           issued), which need not be in the sequence that was flipped 
  1472.  
  1473.                                                                          20  
  1474.  
  1475.  
  1476.           Utility_Belt v1.2                                 Users' Guide 
  1477.           -------------------------------------------------------------- 
  1478.  
  1479.           through.  The syntax is: 
  1480.  
  1481.                VPFLIP {first_page} [{second_page} {third_page} ... 
  1482.           {eighth_page}] 
  1483.  
  1484.           where {first_page}, {second_page}, etc. are the video pages to be 
  1485.           flipped through.  These pages can be in any order, and will be 
  1486.           displayed in the sequence that they are entered on the command 
  1487.           line.  For example,  the command line: 
  1488.  
  1489.                VPFLIP 1 4 7 2 6 
  1490.  
  1491.           will display page 1, followed by 4, then 7, 2, 6 and back to 1 
  1492.           again.  The <PgDn> key is used to go to the next page in the 
  1493.           sequence and <PgUp> is used to go to the previous page.  <Esc> is 
  1494.           used to quit VPFLIP and return to the original video page.  A 
  1495.           prompt message is displayed in black on white text on line 24 of 
  1496.           each page. 
  1497.  
  1498.           Note: when using VPFLIP, line 24 of the pages being flipped 
  1499.           through is erased by the prompt message.  Line 24 of the original 
  1500.           page, if it was erased as part of the flip sequence, is restored 
  1501.           when exiting VPFLIP. 
  1502.  
  1503.           VPFLIP is typically used to create a mini 'slide show' to display 
  1504.           a number of screens, or to view output screens that were 
  1505.           redirected with the VPSET command. 
  1506.  
  1507.           If no parameters are specified on the command line, VPCOPY will 
  1508.           display a summary of its syntax and options. 
  1509.  
  1510.  
  1511.  
  1512.           VPCLS.COM 
  1513.  
  1514.           The DOS CLS (CLear Screen) command is designed to clear the 
  1515.           screen (i.e. erase the contents of the screen and put the cursor 
  1516.           on the top line) of the currently active video page to the 
  1517.           default colors (usually white on black, unless this has been 
  1518.           changed by a special utility or driver such as ANSI.SYS).  It has 
  1519.           no effect on any page other than the currently active page.  
  1520.           VPCLS will clear any specified video page, to any specified 
  1521.           combination of colors that is supported by your display adpator.  
  1522.           The syntax is: 
  1523.  
  1524.                VPCLS {video_page} [{background_color} {foreground_color}] 
  1525.  
  1526.           where:  
  1527.  
  1528.           {video_page}   is the display page to be cleared (0 only for the 
  1529.                          MDA, 0 to 3 for the CGA, 0 to 7 for the EGA or 
  1530.                          VGA); and  
  1531.  
  1532.                                                                          21  
  1533.  
  1534.  
  1535.           Utility_Belt v1.2                                 Users' Guide 
  1536.           -------------------------------------------------------------- 
  1537.  
  1538.           {background_color} and {foreground_color} are the screen 
  1539.                          colors to set.  
  1540.  
  1541.           The colors are optional.  For the MDA, they must be either 0 
  1542.           (black) or 7 (white).  (Even with the MDA, it is still possible 
  1543.           to get black on white rather than the normal white on black.)  
  1544.           For the CGA, EGA and VGA adaptors, color values of 0 to 7 are 
  1545.           available for {background_color} and 0 to 15 for 
  1546.           {foreground_color}.  If they are not specified, white text on a 
  1547.           black background is assumed.  If only the {background_color} is 
  1548.           specified, white is assumed for the {foreground_color}.  The 
  1549.           acceptable color values are listed in the following table: 
  1550.  
  1551.           Table 1: Screen Colors 
  1552.           --------------------+-------------------- 
  1553.                Color Value         Color 
  1554.           --------------------+-------------------- 
  1555.                  0                 Black 
  1556.                  1                 Blue 
  1557.                  2                 Green 
  1558.                  3                 Cyan 
  1559.                  4                 Red 
  1560.                  5                 Magenta 
  1561.                  6                 Brown 
  1562.                  7                 White                Note: the 'bright' colors 
  1563.                  8                 Gray (Bright Black)        (8 to 15) can be 
  1564.                  9                 Bright Blue                used for foreground 
  1565.                 10                 Bright Green               choices only. 
  1566.                 11                 Bright Cyan 
  1567.                 12                 Bright Red 
  1568.                 13                 Bright Magenta 
  1569.                 14                 Yellow (Bright Brown) 
  1570.                 15                 Bright White 
  1571.           --------------------+-------------------- 
  1572.  
  1573.           (Note: This color table is used by all of the video commands 
  1574.           which require colors to be specified.) 
  1575.  
  1576.           For example: 
  1577.  
  1578.                VPCLS 1  
  1579.  
  1580.           will clear video page 1 to white on black.  
  1581.  
  1582.                VPCLS 3 5 14 
  1583.  
  1584.           will clear video page 3 to yellow on magenta. 
  1585.  
  1586.                VPCLS 2 3 
  1587.  
  1588.           will clear video page 2 to white on cyan. 
  1589.  
  1590.  
  1591.                                                                          22  
  1592.  
  1593.  
  1594.           Utility_Belt v1.2                                 Users' Guide 
  1595.           -------------------------------------------------------------- 
  1596.  
  1597.           If no parameters are specified on the command line, VPCLS will 
  1598.           display a summary of its syntax and options. 
  1599.  
  1600.  
  1601.           VPSTRIPE.COM 
  1602.  
  1603.           Similar to the DOS CLS command, VPCLS will clear a screen to a 
  1604.           single pair of background and foreground colors.  For visual 
  1605.           effect, VPSTRIPE will produce a striped or rainbow pattern on the 
  1606.           screen.  Stripes can be horizontal or vertical in any combination 
  1607.           of colors.  The striped screen can then be used as a background 
  1608.           for text windows produced with the VPBOX and VPAT commands.  The 
  1609.           syntax is: 
  1610.  
  1611.                VPSTRIPE {video_page} {stripe_mode} [{color_1} {color_2}] 
  1612.  
  1613.           where: 
  1614.  
  1615.           {video_page}   is the display page to be cleared with stripes (0 
  1616.                          only for the MDA, 0 to 3 for the CGA, 0 to 7 for 
  1617.                          the EGA or VGA);  
  1618.  
  1619.           {stripe_mode}  is H for horizontal stripes or V for vertical 
  1620.                          stripes. 
  1621.  
  1622.           {color_1} and {color_2} are the screen colors to set for a two 
  1623.           color stripe pattern.  Color values of 0 to 15 can be specified 
  1624.           for each color.  The color values are listed above under the 
  1625.           VPCLS command and are optional.  If they are not specified, a 16 
  1626.           color rainbow pattern is used with colors shown in the order of 
  1627.           the above color table.   
  1628.  
  1629.           VPSTRIPE creates stripes by printing a line of 'block' characters 
  1630.           (ASCII code 219) in the specified color, using black as the 
  1631.           'background' color.  Using this method allows 16 color stripes to 
  1632.           be displayed, not just the 8 normal background colors.  When text 
  1633.           is subsequently printed directly on the striped background, the 
  1634.           text will be shown as the stripe color on a black background.  
  1635.           However, in the case of rainbow screens, text will not show up on 
  1636.           the black stripes (i.e. they will be printed black on black). 
  1637.  
  1638.           If no parameters are specified on the command line, VPSTRIPE will 
  1639.           display a summary of its syntax and options. 
  1640.  
  1641.  
  1642.  
  1643.           VPTNT.COM 
  1644.  
  1645.           The standard method to clear the video display (i.e. CLS or 
  1646.           VPCLS) produces a rather boring video effect for anyone who may 
  1647.           be watching it.  Sometimes, you may want to have the screen 
  1648.           clearing process as part of the overall visual impact of the 
  1649.  
  1650.                                                                          23  
  1651.  
  1652.  
  1653.           Utility_Belt v1.2                                 Users' Guide 
  1654.           -------------------------------------------------------------- 
  1655.  
  1656.           batch file.  Utility_Belt offers two programs to produce a 
  1657.           visually more interesting screen clearing effect:  VPTNT and 
  1658.           VPBH.  Since each of these programs is designed for a visual 
  1659.           effect, they work only with the currently active screen page.  
  1660.           However, they work with any active screen page set by the VPSET 
  1661.           command, not just the default page 0.   
  1662.  
  1663.           VPTNT will clear the current screen to the specified colors in an 
  1664.           explosive effect (i.e. any existing text on the screen appears to 
  1665.           be flung out from the center of the screen to the edges).  The 
  1666.           syntax is: 
  1667.  
  1668.                VPTNT {background_color} {foreground_color} [S] 
  1669.  
  1670.           where {background_color} and {foreground_color} are chosen from 
  1671.           the list given above for the VPCLS command.  With fast computers 
  1672.           and video display cards, you may wish to slow down the screen 
  1673.           clearing process to make it more visible.  If the optional S 
  1674.           parameter is included, the screen is cleared in 'slow' mode.  
  1675.           With slow mode, the screen is cleared over a time span of about 2 
  1676.           seconds, compared to the fractions of a second required for fast 
  1677.           mode. 
  1678.  
  1679.           For example: 
  1680.  
  1681.                VPTNT 1 14 
  1682.  
  1683.           will quickly 'explode' the screen to yellow on blue. 
  1684.  
  1685.                VPTNT 2 7 S 
  1686.  
  1687.           will slowly 'explode' the screen to white on green. 
  1688.  
  1689.           For maximum explosive effect with VPTNT, we recommend that you 
  1690.           use fast mode. 
  1691.  
  1692.           If no parameters are specified on the command line, VPTNT will 
  1693.           display a summary of its syntax and options. 
  1694.  
  1695.  
  1696.  
  1697.           VPBH.COM 
  1698.  
  1699.           The second visual effect is VPBH, which will clear the screen 
  1700.           with a 'black hole' implosion effect (i.e. any existing text on 
  1701.           the screen seems to be sucked in to the center of the screen).  
  1702.           The syntax is: 
  1703.  
  1704.                VPBH {background_color} {foreground_color} [S] 
  1705.  
  1706.           where {background_color} and {foreground_color} are chosen from 
  1707.           the list given above for the VPCLS command.  With fast computers 
  1708.  
  1709.                                                                          24  
  1710.  
  1711.  
  1712.           Utility_Belt v1.2                                 Users' Guide 
  1713.           -------------------------------------------------------------- 
  1714.  
  1715.           and video display cards, you may wish to slow down the screen 
  1716.           clearing process to make it more visible.  If the optional S 
  1717.           parameter is included, the screen is cleared in 'slow' mode.  
  1718.           With slow mode, the screen is cleared over a time span of about 2 
  1719.           seconds, compared to the fractions of a second required for fast 
  1720.           mode. 
  1721.  
  1722.           For example: 
  1723.  
  1724.                VPBH 1 14 
  1725.  
  1726.           will quickly 'implode' the screen to yellow on blue. 
  1727.  
  1728.                VPBH 2 7 S 
  1729.  
  1730.           will slowly 'implode' the screen to white on green. 
  1731.  
  1732.           If no parameters are specified on the command line, VPBH will 
  1733.           display a summary of its syntax and options. 
  1734.  
  1735.  
  1736.           VPAT.COM 
  1737.  
  1738.           Without using a special device driver like ANSI.SYS, DOS cannot 
  1739.           print a message at a user selected spot on the screen.  This 
  1740.           makes it very difficult to build windowed menus and other types 
  1741.           of display screens which require text to be printed at a specific 
  1742.           location on the screen.  Even with ANSI.SYS installed, you are 
  1743.           limited to printing on the currently displayed screen page.  VPAT 
  1744.           wil print a text string at a specified location on any video 
  1745.           page.  The syntax is: 
  1746.  
  1747.                VPAT {video_page} {background_color} {foreground_color} 
  1748.                          {row} {column} {text} 
  1749.  
  1750.           where: 
  1751.  
  1752.           {video_page}   is the display page to be printed on (0 only for 
  1753.                          the MDA, 0 to 3 for the CGA, 0 to 7 for the EGA or 
  1754.                          VGA);  
  1755.  
  1756.           {background_color} and {foreground_color} are the screen colors 
  1757.                          to use.  The values are given above for the 
  1758.                          description of VPCLS; 
  1759.  
  1760.           {row}          is the screen row (line) to print on.  Rows 0 to 
  1761.                          24 are supported on all display adpators.  Special 
  1762.                          video modes (like 50 line VGA mode) have other 
  1763.                          maximum values. 
  1764.  
  1765.           {column}       is the screen column to start printing at.  
  1766.                          Columns 0 to 79 are supported on all display 
  1767.  
  1768.                                                                          25  
  1769.  
  1770.  
  1771.           Utility_Belt v1.2                                 Users' Guide 
  1772.           -------------------------------------------------------------- 
  1773.  
  1774.                          adpators.  Special video modes (like 130 colum VGA 
  1775.                          mode) have other maximum values. 
  1776.  
  1777.           {text}         is the text string to be printed.  It can be up to 
  1778.                          about 100 characters long  (although with the 
  1779.                          screen width limitation of most video modes, i.e. 
  1780.                          80 columns, it will normally be much less) and can 
  1781.                          contain any printable character.  Embedded spaces 
  1782.                          are allowed, but leading spaces are automatically 
  1783.                          removed.  Uppercase and lowercase characters are 
  1784.                          preserved.   
  1785.  
  1786.           Note: If {text} is longer than the amount of space remaining on 
  1787.           the chosen screen line, it will 'wrap' around to the next screen 
  1788.           line starting at the column specified by the {column} parameter. 
  1789.  
  1790.           For example: 
  1791.  
  1792.                VPAT 1 2 15 10 20 Hello !! 
  1793.  
  1794.           will print the text "Hello !!" on video page 1, starting at line 
  1795.           10, column 20 in bright white letters on green. 
  1796.  
  1797.                VPAT 0 1 14 10 70 This is a long line 
  1798.  
  1799.           will print the text "This is a" on line 10 starting at column 70, 
  1800.           followed by "long line" on line 11, starting at column 70. 
  1801.  
  1802.           If no parameters are specified on the command line, VPAT will 
  1803.           display a summary of its syntax and options. 
  1804.  
  1805.  
  1806.  
  1807.           VPBOX.COM 
  1808.  
  1809.           It is often desirable to 'frame' messages and text in a box on 
  1810.           the screen to make it stand out (or to produce a series of 
  1811.           'windows').  VPBOX draws a box of a given size at a given 
  1812.           location on the screen.  It is typically used prior to VPAT to 
  1813.           create message windows on a screen.  The syntax is: 
  1814.  
  1815.                VPBOX {video_page} {background_color} {foreground_color} 
  1816.                          {style} {top_line} {bot_line} {left_col} 
  1817.                          {right_col} 
  1818.  
  1819.           where: 
  1820.  
  1821.           {video_page}   is the display page to create the box on (0 only 
  1822.                          for the MDA, 0 to 3 for the CGA, 0 to 7 for the 
  1823.                          EGA or VGA);  
  1824.  
  1825.           {background_color} and {foreground_color} are the screen colors 
  1826.  
  1827.                                                                          26  
  1828.  
  1829.  
  1830.           Utility_Belt v1.2                                 Users' Guide 
  1831.           -------------------------------------------------------------- 
  1832.  
  1833.                          to use.  The values are given above for the 
  1834.                          description of VPCLS; 
  1835.  
  1836.           {style}        is the type of line to draw around the box, as 
  1837.                          given in the table below.  A total of 26 line 
  1838.                          styles are supported.  Styles 0 to 8 are lines in 
  1839.                          the normal sense, while styles 9 to 25 are borders 
  1840.                          composed of various specialty characters. 
  1841.  
  1842.           {top_line}     is the screen line (row) for the top of the box.  
  1843.                          Lines 0 to 24 are supported on all display 
  1844.                          adpators.  Special video modes (like 50 line VGA 
  1845.                          mode) have other maximum values. 
  1846.  
  1847.           {bot_line}     is the screen line for the bottom of the box.  
  1848.                          Lines 0 to 24 are supported on all display 
  1849.                          adpators.  Special video modes (like 50 line VGA 
  1850.                          mode) have other maximum values.  {bot_line} must 
  1851.                          be greater than {top_line}. 
  1852.             
  1853.           {left_col}     is the screen column for the left side of the box. 
  1854.                          Columns 0 to 79 are supported on all display 
  1855.                          adpators.  Special video modes (like 130 colum VGA 
  1856.                          mode) have other maximum values. 
  1857.  
  1858.           {right_col}    is the screen column for the right side of the 
  1859.                          box. Columns 0 to 79 are supported on all display 
  1860.                          adpators.  Special video modes (like 130 colum VGA 
  1861.                          mode) have other maximum values.  {right_col} must 
  1862.                          be greater than {left_col}. 
  1863.  
  1864.  
  1865.           Note: Unpredictable results (i.e. scrambled screen images) will 
  1866.           occur if the line and column parameters are beyond the rage 
  1867.           normally supported by your video adaptor. 
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.                                                                          27  
  1887.  
  1888.  
  1889.           Utility_Belt v1.2                                 Users' Guide 
  1890.           -------------------------------------------------------------- 
  1891.  
  1892.  
  1893.           Table 2: Border Styles 
  1894.           ----------------+--------------------------------- 
  1895.                Box Style      Line Type 
  1896.           ----------------+--------------------------------- 
  1897.                0              no lines 
  1898.                1              thin single lines 
  1899.                2              thin double lines 
  1900.                3              single horizontal, double vertical 
  1901.                4              double horizontal, single vertical 
  1902.                5              thick solid lines 
  1903.                6              light checkered thick lines 
  1904.                7              medium checkered thick lines 
  1905.                8              dark checkered thick lines 
  1906.                9              smiling face 
  1907.                10             reverse smiling face 
  1908.                11             heart 
  1909.                12             diamond 
  1910.                13             club 
  1911.                14             spade 
  1912.                15             dot 
  1913.                16             reverse dot 
  1914.                17             circle 
  1915.                18             reverse circle 
  1916.                19             sinlge musical note 
  1917.                20             double musical note 
  1918.                21             sun 
  1919.                22             square 
  1920.                23             small circle 
  1921.                24             medium dot 
  1922.                25             small dot 
  1923.           ----------------+--------------------------------- 
  1924.  
  1925.           For example: 
  1926.  
  1927.                VPBOX 0 4 7 1 7 20 4 54 
  1928.  
  1929.           will draw a single lined box on video page 0, white on red, with 
  1930.           the top left at row 7, column 4 and the bottom right at row 20, 
  1931.           column 54. 
  1932.  
  1933.           Overlapping boxes can be created by using multiple VPBOX 
  1934.           commands.  The most recently issued VPBOX command will be the top 
  1935.           layer.  For example, the following sequence will create a blue on 
  1936.           white window with a black 'shadow' from 2 VPBOX commands: 
  1937.  
  1938.                VPBOX 0 0 0 0 5 20 20 40 
  1939.                VPBOX 0 1 7 1 6 21 21 41 
  1940.  
  1941.           If no parameters are specified on the command line, VPBOX will 
  1942.           display a summary of its syntax and options. 
  1943.  
  1944.  
  1945.                                                                          28  
  1946.  
  1947.  
  1948.           Utility_Belt v1.2                                 Users' Guide 
  1949.           -------------------------------------------------------------- 
  1950.  
  1951.  
  1952.                           SECURITY AND DIAGNOSTIC UTILITIES 
  1953.  
  1954.  
  1955.           An increasing number of computers in business and educational 
  1956.           environments are being interconnected through Local Area Networks 
  1957.           (LAN's) and Wide Area Networks (WAN's).  Although this 
  1958.           interconnection offers many advantages, it also offers some 
  1959.           disadvantages, namely: data security concerns and access to 
  1960.           system level resources. 
  1961.  
  1962.           Many area network administrators prefer to keep users totally 
  1963.           isolated from the DOS command line.  All programs and data are 
  1964.           accessed through established network menu systems, which are 
  1965.           controlled by the network administrator.  However, one of the 
  1966.           main security concerns occurs before a user is connected or 
  1967.           logged in to the network.  Each workstation usually contains a 
  1968.           hard disk and perhaps even one or more floppy drives.  If the 
  1969.           user chooses not to log into the network, they usually have full 
  1970.           access to whatever is stored on these devices. 
  1971.  
  1972.           The two security programs included in the Utility_Belt collection 
  1973.           can be used to keep casual observers away from the DOS command 
  1974.           line in these types of situtations.  Note that, as with any 
  1975.           security system, it is far from being unbreakable, but it is 
  1976.           usually sufficient to keep out all casual snoop and scare off a 
  1977.           good many determined hackers as well. 
  1978.  
  1979.  
  1980.           HANG.COM 
  1981.  
  1982.           As its name implies, HANG will simply lockup the computer, and 
  1983.           require a cold reset (i.e. power off, then power on) to restart 
  1984.           the system.  The syntax is: 
  1985.  
  1986.                HANG [/Q;] {message} 
  1987.  
  1988.           where: 
  1989.  
  1990.           {message} is a text message to be displayed on the screen while 
  1991.                     it is locked up.  It can be up to about 120 characters 
  1992.                     long  (although with the screen width limitation of 
  1993.                     most video modes, i.e. 80 columns, it will normally be 
  1994.                     much less) and can contain any printable character.  
  1995.                     Embedded spaces are allowed, but leading spaces are 
  1996.                     automatically removed.  Uppercase and lowercase 
  1997.                     characters are preserved.   
  1998.  
  1999.           /Q;       specifies the optional 'quiet' mode.  If /Q is NOT 
  2000.                     used, an alarm tone will also be sounded during the 
  2001.                     lockup. 
  2002.  
  2003.  
  2004.                                                                          29  
  2005.  
  2006.  
  2007.           Utility_Belt v1.2                                 Users' Guide 
  2008.           -------------------------------------------------------------- 
  2009.  
  2010.           For example: 
  2011.  
  2012.                HANG /Q; Security Violation 
  2013.  
  2014.           will lockup the computer while displaying the message "Security 
  2015.           Violation" on the screen. 
  2016.  
  2017.                HANG Security Violation 
  2018.  
  2019.           will lockup the computer while displaying the message "Security 
  2020.           Violation" on the screen and sounding an audio alarm tone. 
  2021.  
  2022.           HANG may be used as part of a network login procedure such as: 
  2023.  
  2024.                @ECHO OFF 
  2025.                REM ===  Use your own standard login procedure or command 
  2026.                LOGIN 
  2027.                REM ===  Check for Login Error 
  2028.                IF ERRORLEVEL 1 GOTO HANG 
  2029.                REM ===  Exit normally if successful 
  2030.                GOTO END 
  2031.                REM ===  Otherwise, lockup 
  2032.                :HANG 
  2033.                HANG Security Violation - Network Access Denied 
  2034.                :END 
  2035.  
  2036.  
  2037.           If no parameters are specified on the command line, HANG will 
  2038.           display a summary of its syntax and options. 
  2039.  
  2040.  
  2041.  
  2042.           REBOOT.COM 
  2043.  
  2044.           REBOOT will perform a software controlled re-booting of the 
  2045.           computer.  The syntax is: 
  2046.  
  2047.                REBOOT {message}    or 
  2048.  
  2049.                REBOOT /N 
  2050.  
  2051.  
  2052.           where: 
  2053.  
  2054.           {message} is a text message to be displayed on the screen before 
  2055.                     rebooting.  It can be up to about 120 characters long  
  2056.                     (although with the screen width limitation of most 
  2057.                     video modes, i.e. 80 columns, it will normally be much 
  2058.                     less) and can contain any printable character.  
  2059.                     Embedded spaces are allowed, but leading spaces are 
  2060.                     automatically removed.  Uppercase and lowercase 
  2061.                     characters are preserved.   
  2062.  
  2063.                                                                          30  
  2064.  
  2065.  
  2066.           Utility_Belt v1.2                                 Users' Guide 
  2067.           -------------------------------------------------------------- 
  2068.  
  2069.           /N        specifies the optional 'no wait' mode.  If /N is used, 
  2070.                     reboot is immediate without displaying any message. 
  2071.  
  2072.           For example: 
  2073.  
  2074.                REBOOT Resetting the computer ... Please Wait 
  2075.  
  2076.           will display the message "Resetting the computer ... Please 
  2077.           Wait", then re-boot the computer after a short delay. 
  2078.  
  2079.           REBOOT may be used as part of a network login procedure such as: 
  2080.  
  2081.                @ECHO OFF 
  2082.                REM ===  Use your own standard login procedure or command 
  2083.                LOGIN 
  2084.                REM ===  Check for Login Error 
  2085.                IF ERRORLEVEL 1 GOTO REBOOT 
  2086.                REM ===  Exit normally if successful 
  2087.                GOTO END 
  2088.                REM ===  Otherwise, lockup 
  2089.                :REBOOT 
  2090.                REBOOT Security Violation - Network Access Denied 
  2091.                :END 
  2092.  
  2093.  
  2094.           REBOOT can also be used to change the system configuration by 
  2095.           keeping multiple copies of the AUTOEXEC.BAT or CONFIG.SYS files.  
  2096.           For example, if you had several different AUTOEXEC.BAT or 
  2097.           CONFIG.SYS files with different drivers, or memory 
  2098.           configurations, etc., you could use a short batch file menu to 
  2099.           select which one you wanted.  For example: 
  2100.  
  2101.                REM ===  SELAUTO.BAT 
  2102.                @ECHO OFF 
  2103.  
  2104.                REM ===  SELECT startup mode 
  2105.                SELECT Startup Options; WINDOWS; DOS; NETWORK 
  2106.                IF ERRORLEVEL 3 GOTO NETWORK 
  2107.                IF ERRORLEVEL 2 GOTO DOS 
  2108.                IF ERRORLEVEL 1 GOTO WINDOWS 
  2109.                GOTO END 
  2110.  
  2111.                REM ===  COPY correct files to AUTOEXEC.BAT and CONFIG.SYS 
  2112.                :WINDOWS 
  2113.                COPY AUTOEXEC.WIN AUTOEXEC.BAT 
  2114.                COPY CONFIG.WIN CONFIG.SYS 
  2115.                GOTO BOOT 
  2116.                :DOS 
  2117.                COPY AUTOEXEC.DOS AUTOEXEC.BAT 
  2118.                COPY CONFIG.DOS CONFIG.SYS 
  2119.                GOTO BOOT 
  2120.                :NETWORK 
  2121.  
  2122.                                                                          31  
  2123.  
  2124.  
  2125.           Utility_Belt v1.2                                 Users' Guide 
  2126.           -------------------------------------------------------------- 
  2127.  
  2128.                COPY AUTOEXEC.NET AUTOEXEC.BAT 
  2129.                COPY CONFIG.NET CONFIG.SYS 
  2130.  
  2131.                REM === Reboot the using new AUTOEXEC and CONFIG files 
  2132.                :BOOT 
  2133.                REBOOT Setting up system configuration ... Please wait 
  2134.                :END 
  2135.  
  2136.  
  2137.  
  2138.           If no parameters are specified on the command line, REBOOT will 
  2139.           display a summary of its syntax and options. 
  2140.  
  2141.  
  2142.  
  2143.  
  2144.           WHATIS.COM 
  2145.  
  2146.           Many different device drivers and configuration programs exist 
  2147.           that can modify the way the operating system interfaces with the 
  2148.           hardware.  Usually, things work OK, but when problems occur on a 
  2149.           system, it is often difficult to figure out who is saying what to 
  2150.           whom.  When it comes to disk drives (floppy disks, hard disks, 
  2151.           etc) both local, and shared network resources, WHATIS will tell 
  2152.           you what the various components of the operating system are 
  2153.           reporting to each other.  The syntax is: 
  2154.  
  2155.                WHATIS {logical_drive} 
  2156.  
  2157.           where {logical_drive} is the drive letter assigned to the logical 
  2158.           device.  For example: 
  2159.  
  2160.                WHATIS A 
  2161.  
  2162.           will report the physical and logical parameters associated with 
  2163.           drive A:, as reported by the various DOS and BIOS routines.  A 
  2164.           number of parameters are checked and reported, such as: 
  2165.  
  2166.             -  total number of floppy drives on system as reported by the 
  2167.                BIOS equipment list word at 0040:0010 
  2168.  
  2169.             -  physical device number used by the BIOS disk interrupt 13 to 
  2170.                address the device 
  2171.  
  2172.             -  type of device (i.e. 360k, 1.2 meg, hard disk, etc) as 
  2173.                reported by the BIOS (usually from the CMOS RAM) and DOS 
  2174.                (usually from device drivers).  Normally these are the same, 
  2175.                but may be different if a device driver is being used. 
  2176.  
  2177.             -  whether the device is local or remote (i.e. a network drive) 
  2178.  
  2179.             -  whether the media is removable 
  2180.  
  2181.                                                                          32  
  2182.  
  2183.  
  2184.           Utility_Belt v1.2                                 Users' Guide 
  2185.           -------------------------------------------------------------- 
  2186.  
  2187.             -  whether the device is 'shared' with another logical drive 
  2188.  
  2189.             -  if a hard disk or network drive, the size of the drive and 
  2190.                amount of free space available. 
  2191.  
  2192.           If no parameters are specified on the command line, WHATIS will 
  2193.           display a summary of its syntax and options. 
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.                                                                          33  
  2241.  
  2242.  
  2243.           Utility_Belt v1.2                                 Users' Guide 
  2244.           -------------------------------------------------------------- 
  2245.  
  2246.                              APPENDIX A: Version History 
  2247.  
  2248.           New for Release 1c  (94-07-01): 
  2249.           -    Release 1c now includes the time check utility TC.COM.  TC 
  2250.                returns a DOS ERRORLEVEL code based on time of day or day of 
  2251.                week. 
  2252.  
  2253.  
  2254.           New for Release 1b  (93-05-27): 
  2255.           -    Previous versions of the utility SLEEP would reset the DOS 
  2256.                clock to midnight on some systems.  This has been corrected 
  2257.                with version 1.3 of SLEEP.COM. 
  2258.  
  2259.  
  2260.           New for version 1a  (92-11-05): 
  2261.           -    Utility Belt, release 1a can now be registered using the 
  2262.                CompuServe shareware registration database.  This service 
  2263.                lets you pay for shareware registrations through your 
  2264.                CompuServe account.  After logging in to CompuServe, type GO 
  2265.                SWREG and follow the on screen prompts.  The database 
  2266.                registration ID number is 433. 
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.                                                                          34